package flca.mda.api.util;

import flca.mda.codegen.CodegenConstants;

public class PropertyUtils {


//	public static boolean skipAllExisting() {
//		String s = getProperty(SKIP_ALL_KEY);
//		boolean b = (s != null && s.toLowerCase().equals("true"));
//		return b;
//	}
	
	
	 //--- some common getters
	 
	 public static String getOs() 
	 {
		 return System.getProperty("os.name");
	 }
	 
	 public static boolean isWindows()
	 {
		 return getOs().toLowerCase().startsWith("win");
	 }
	 public static boolean isLinux() {
		 return getOs().toLowerCase().startsWith("linux");
	 }
	 
	 public static String getUserDir()
	 {
		 return System.getProperty("user.dir");
	 }	
	 
	 public static String getPathDelim()
	 {
		 if (isWindows()) {
			 return "\\";
		 } else {
			 return "/";
		 }
	 }
	 
	 public static boolean isJunitTest()
	 {
		 String s = System.getProperty(CodegenConstants.JUNIT_TEST);
		 return (s != null && s.trim().toLowerCase().equals("true"));
	 }
}
